<?php
	require_once("db.php");
	$dbAccses = new db();
	$statement = "CREATE TABLE IF NOT EXISTS ".prefix."categorieconet (
			blogID int(11) NOT NULL,
			catID int(11) NOT NULL,
			PRIMARY KEY (blogID,catID)
		);";
	$dbAccses ->sql($statement);
	$statement = "CREATE TABLE IF NOT EXISTS ".prefix."categories (
			catID int(11) NOT NULL AUTO_INCREMENT,
			`name` varchar(30) NOT NULL,
			parentID int(11) NOT NULL,
			PRIMARY KEY (catID)
		);";
	$dbAccses ->sql($statement);
	$statement = "
		CREATE TABLE IF NOT EXISTS ".prefix."members (
			userID int(11) NOT NULL AUTO_INCREMENT,
			`name` varchar(30) NOT NULL,
			email varchar(100) NOT NULL,
			`password` varchar(100) NOT NULL,
			googleName text NOT NULL,
			googlePassword text NOT NULL,
			activiated int(11) NOT NULL,
			PRIMARY KEY (userID)
		);";
	$dbAccses ->sql($statement);
	$statement = "CREATE TABLE IF NOT EXISTS ".prefix."post (
			blogID int(11) NOT NULL AUTO_INCREMENT,
			author int(11) NOT NULL,
			title varchar(30) NOT NULL,
			summary text NOT NULL,
			content text NOT NULL,
			tumbnail varchar(100) NOT NULL,
			PRIMARY KEY (blogID))";
	$dbAccses ->sql($statement);
	$_SESSION['dbBuild'] = "true";
?>